﻿namespace AppServiceDtoToEntityDemo.Domain.Orders;

public class OrderItem
{
    protected OrderItem() { }

    public int Id { get; set; }
    public int OrderId { get; set; }
    public int ProductId { get; protected set; }
    public int Amount { get; protected set; }
    public string Description1 { get; protected set; }
    public string Description2 { get; protected set; }
    public string Description3 { get; protected set; }
    public string Description4 { get; protected set; }
    public string Description5 { get; protected set; }
    public string Description6 { get; protected set; }
    public string Description7 { get; protected set; }
    public string Description8 { get; protected set; }
    public string Description9 { get; protected set; }
    public string Description10 { get; protected set; }
    public string Description11 { get; protected set; }
    public string Description12 { get; protected set; }
    public string Description13 { get; protected set; }
    public string Description14 { get; protected set; }
    public string Description15 { get; protected set; }

    public class OrderItemBuilder
    {
        private int ProductId;
        private int Amount;
        private string Description1;
        private string Description2;
        private string Description3;
        private string Description4;
        private string Description5;
        private string Description6;
        private string Description7;
        private string Description8;
        private string Description9;
        private string Description10;
        private string Description11;
        private string Description12;
        private string Description13;
        private string Description14;
        private string Description15;

        protected OrderItemBuilder()
        {

        }

        public static OrderItemBuilder CreateBuilder()
        {
            return new OrderItemBuilder();
        }

        public OrderItem Build()
        {
            return new OrderItem()
            {
                ProductId = ProductId,
                Amount = Amount,
                Description1 = Description1,
                Description2 = Description2,
                Description3 = Description3,
                Description4 = Description4,
                Description5 = Description5,
                Description6 = Description6,
                Description7 = Description7,
                Description8 = Description8,
                Description9 = Description9,
                Description10 = Description10,
                Description11 = Description11,
                Description12 = Description12,
                Description13 = Description13,
                Description14 = Description14,
                Description15 = Description15,
            };
        }

        public OrderItemBuilder SetAmount(int amount)
        {
            Amount = amount;
            return this;
        }

        public OrderItemBuilder ProductFrom(int productId)
        {
            ProductId = productId;
            return this;
        }

        public OrderItemBuilder SetDescription1(string description)
        {
            Description1 = description;
            return this;
        }

        public OrderItemBuilder SetDescription2(string description)
        {
            Description2 = description;
            return this;
        }

        public OrderItemBuilder SetDescription3(string description)
        {
            Description3 = description;
            return this;
        }

        public OrderItemBuilder SetDescription4(string description)
        {
            Description4 = description;
            return this;
        }

        public OrderItemBuilder SetDescription5(string description)
        {
            Description5 = description;
            return this;
        }

        public OrderItemBuilder SetDescription6(string description)
        {
            Description6 = description;
            return this;
        }

        public OrderItemBuilder SetDescription7(string description)
        {
            Description7 = description;
            return this;
        }

        public OrderItemBuilder SetDescription8(string description)
        {
            Description8 = description;
            return this;
        }

        public OrderItemBuilder SetDescription9(string description)
        {
            Description9 = description;
            return this;
        }

        public OrderItemBuilder SetDescription10(string description)
        {
            Description10 = description;
            return this;
        }

        public OrderItemBuilder SetDescription11(string description)
        {
            Description11 = description;
            return this;
        }

        public OrderItemBuilder SetDescription12(string description)
        {
            Description12 = description;
            return this;
        }

        public OrderItemBuilder SetDescription13(string description)
        {
            Description13 = description;
            return this;
        }

        public OrderItemBuilder SetDescription14(string description)
        {
            Description14 = description;
            return this;
        }

        public OrderItemBuilder SetDescription15(string description)
        {
            Description15 = description;
            return this;
        }
    }
}
